<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
  
<!DOCTYPE html>
<html>
	<head>
		<link href="${pageContext.request.contextPath}/web/css/style.css"
			rel="stylesheet" type="text/css" />
		<jsp:include page="../inc.jsp"></jsp:include>
		<script  type="text/javascript">
		$(function(){ 

			
			$('input').click(function(){
				var $parent = $(this).parent();
				$.ajax({
					url : '${pageContext.request.contextPath}/qtmk/remindWarnAction!noAuth_confirm.html',
					data : {id : $(this).attr("id")},
					type : "POST",
					success : function(d){
					
						var json = $.parseJSON(d);
						if (json.success) {
							$parent.remove();
						}
						parent.sy.messagerShow({
							msg : json.msg,
							title : '提示'
						});
					}
				});
			});
		});
		</script>
	</head>
	<body>
		
		<table id="table" width="100%"  border="1" cellspacing="0" bordercolor="#99BCFC">
			<c:if test="${not empty RemindWarns}">
				<thead>
					<th>预警类型</th>
					<th>内容</th>
					<th>时间</th>
					<!-- <th>用户</th>
					<th>仓库</th> -->
					<th>处理</th>
				</thead>
				<tbody>
				<c:forEach items="${RemindWarns}" var="RemindWarn">
					<tr>
						<td> 
						<c:choose>
						    <c:when test="${RemindWarn.type==11 }">
								零库存预警
						    </c:when>
						    <c:when test="${RemindWarn.type==12 }">
								负库存预警
						    </c:when>
						    <c:when test="${RemindWarn.type==13 }">
								低库存预警
						    </c:when>
						    <c:when test="${RemindWarn.type==14 }">
								滞销品预警
						    </c:when>
						    <c:when test="${RemindWarn.type==21 }">
								今日生日会员
						    </c:when>
						    <c:when test="${RemindWarn.type==22 }">
								一周内生日会员
						    </c:when>
						    <c:when test="${RemindWarn.type==31 }">
								积分600预警
						    </c:when>
						    <c:when test="${RemindWarn.type==32 }">
								积分3000预警
						    </c:when>
						    <c:otherwise>
								其他预警
						    </c:otherwise>  
						    </c:choose>
						</td>
						<td>
							${RemindWarn.content }&nbsp;
						</td>
						<td>
							${RemindWarn.time }&nbsp;
						</td>
						<%-- <td>
							${RemindWarn.user }&nbsp;
						</td>
						<td>
							${RemindWarn.repertory }&nbsp;
						</td> --%>
						<td>
							<input type="button" value="处理" id="${RemindWarn.id}" />
						</td>
					</tr>
				</c:forEach>
				</tbody>
			</c:if>
		</table>
	</body>
</html>